Triends.view.SearchOverlay = Ext.create('Ext.Panel',{
	id: 'searchoverlay',
	layout: 'fit',
	hideOnMaskTap: true,
	scrollable: false,
	modal: true,
	centered: true,
	width: 330,
	height: 80,
	items: [
		{
			xtype: 'toolbar',
			items:[
				{
					xtype: 'searchfield',
					id: 'postsearch',
					placeHolder: 'Input Keywords',
					autocomplete: true,
					autoCreateField: true	
				},
				{
					xtype: 'button',
					id: 'searchaction',
					height: '20px',
					iconCls: 'search',
					iconMask: true,
					handler: function(){
						var searchValue = Ext.getCmp("postsearch").getValue();
						var postStore = Ext.getStore('poststore');
						var searchoverlay = Ext.getCmp("searchoverlay");
						var postsearch = Ext.getCmp("postsearch");
						Ext.data.JsonP.request({
							url: 'http://itscreater.cafe24.com/Triends/PostSearch.jsp',
							params: {searchvalue: searchValue},
							callbackkey: 'callback',
							success: function(result){
								postStore.setData(result);
								postsearch.reset();
								searchoverlay.hide();
							}
						})
					}
				}
			]
		}
	]
})